<template>
  <div class="dashboard-container">
    <component :is="currentRole" />
  </div>
</template>

<script>

import { mapGetters } from 'vuex'
import adminDashboard from './admin'
import workerDashboard from './worker'
export default {
  name: 'Dashboard',
  components: { adminDashboard, workerDashboard },
  data() {
    return {
      currentRole: 'workerDashboard'
    }
  },
  computed: {
    ...mapGetters([
      'role'
    ])
  },
  created() {
    // if (!this.role.includes('ADMIN')) {
    //   this.currentRole = 'workerDashboard'
    // }
  }
}
</script>

<style lang="scss" scoped>
.dashboard-container {
  /*height: 870px;*/
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
